package com.lv.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <p>
 * 
 * </p>
 *
 * @author 凉薄
 * @since 2022-01-21
 */
@Getter
@Setter
@ToString
@TableName("sys_order")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单id [no]
     */
    @JsonSerialize(using= ToStringSerializer.class)
    @TableId(type = IdType.ASSIGN_ID)
    private Long orderId;

    /**
     * 客户id
     */
    private Long customerId;

    /**
     * 创建日期 [date-create]
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新日期 [date-update]
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 结账状态 (0=未结,1=已结) [j]
     */
    private Boolean status;

    /**
     * 已结金额
     */
    private BigDecimal amountPaid;
}
